package com.grape.transaction.lcn.producer.service;

import com.codingapi.txlcn.tc.annotation.TxTransaction;
import com.grape.transaction.lcn.producer.mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
public class ProducerService {
    @Autowired
    UserMapper userMapper;

    @TxTransaction
    @Transactional
    public void addUser(String i) {
        userMapper.insert("myx",25);
    }
}
